home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 026-050 / scopedisk27 / postcard1.0 / postcard.doc < prev    next >
Text File  |  1995-03-18  |  5KB  |  122 lines

  1.             PostCard - a Mini-HyperText
  2.  
  3.                 Version 1.0
  4.                 04/15/88
  5.  
  6.                 by Tim Holloway
  7.  
  8.  
  9.  
  10. Here's a neat little toy, and a useful one, too.  PostCard is my (initial)
  11. answer to Apple's HyperCard [tm] system for the Amiga.  I call it PostCard
  12. because of its most obvious limitation - it operates only on single "cards" -
  13. it doesn't support stacks.  Still, it's suprising what you can do within
  14. that limit, and eventually I expect to see it removed.
  15.  
  16. Basically, here's how it works.  You build one or more cards, using
  17. an offline program named MakeCard.  Not as nice as interactive design,
  18. but it was a lot quicker to write.  Something else to address later.
  19. Then execute PostCard.  PostCard creates a private screen containing the
  20. background image.  Overlaying the background are one or more Gadgets.
  21. Presently that means text strings.  With each text string gadget an
  22. action can be associated.  When you click on that string, the displayed
  23. screen is removed and the action is taken.  That's pretty much it - the
  24. power lies in its simplicity.
  25.  
  26. Creating a PostCard:
  27.  
  28. Each PostCard is an IFF-format file.  It is not compatible with a HyperCard
  29. stack file.  The card is defined by a special form: HYP0, or HYPR,
  30. which contains an ILBM image of the background and additional chunks that
  31. define the PostCard characteristics.  Any valid ILBM picture can be used -
  32. sorry, I don't support HAM mode.
  33.  
  34. The MakeCard program takes input from the standard input stream and
  35. creates a file with the supplied name:
  36.  
  37.     MakeCard <statements Mycard
  38.  
  39. if the statements are in a file named "statements" and you wish to create
  40. a PostCard named Mycard.  MakeCard doesn't create icons, so you must
  41. duplicate the sample one (mlsdata.info)
  42.  
  43. The first statement must always define the background image:
  44.  
  45.     BG Myimage.pic
  46.  
  47. The background image is taken from the indicated file (Myimage.pic),
  48. which is an IFF ILBM file, such as created by Deluxe Paint, etc.
  49.  
  50. Now define some fonts.  They will be used to render the caption text.
  51.  
  52.     font fontname pointsize attribs
  53.  
  54. For example: font ruby.font 12 0
  55.  
  56. 'attribs' are as defined in the Rom Kernel Manual, and indicate such
  57. options as italics, boldface, etc.  Specify attribs as a DECIMAL number!
  58.  
  59. After all the fonts have been defined, you can define captions.  Captions
  60. are string definitions that become Boolean Gadgets on the screen.  The
  61. specification is as follows:
  62.  
  63.     capt left top font color,text
  64.  
  65. left and top are the coordinates of the upper left corner of the caption.
  66. Font is the font number - the first "font" statement defines font 1, the
  67. second defines font 2, etc.  Color is the color number to use.  Adding
  68. 100 to the color indicates the the text will be rendered in JAM2 mode,
  69. otherwise JAM1 will be used.  JAM2 causes the text to be rendered on a
  70. rectangle of the background color (color 0).  The text is the caption itself.
  71.  
  72. Following each caption should be an action.  An Action may be an AmigaDOS
  73. command.  In this case, the command is executed and the postcard is then
  74. redisplayed.  The special command "Jump" causes a different card to
  75. be displayed.  The special command "Quit" causes the PostCard program
  76. to terminate.  A typical caption might look like this:
  77.  
  78.     action Copy Aspirin.help to PRT:
  79.  
  80. Now, let's put them all together:
  81.  
  82. BG MedicineCabinet.pic
  83. Font Ruby.font 12,0
  84. Font Ruby.font 15,0
  85. capt 20,20,1,1,Aspirin
  86. action Copy Aspirin.help to PRT:
  87. capt 100,20,1,1,Antihistamine
  88. action Copy Antihistimine.help to PRT:
  89. capt 40,20,1,1,Iodine
  90. action Copy Iodine.help to PRT:
  91. end
  92.  
  93. That's it.
  94.  
  95. Using PostCard:
  96.  
  97. Postcard may be run either from the CLI or the WorkBench (if an icon
  98. is provided for the card).  From CLI, simply say:
  99.  
  100.     PostCard filename
  101.  
  102. Unlike most WorkBench programs,  I presently don't support multiple project
  103. selection.  It didn't seem to make sense to do so.  Maybe I'm wrong (?).
  104.  
  105. Distribution:
  106.  
  107. While I generally prefer to give my software away (all that fun and get PAID
  108. for it, too?), the people at the grocery store has a somewhat less
  109. enlightened attitude.  If you like this program, send me $25.  It'll keep
  110. me from starving to death while I come up with improvements.  The more
  111. responses I get, the more incentive I have to improve it - if you're not
  112. interested in it, I won't be either.  The details can be found by pressing
  113. the HELP key.
  114.  
  115. The programs and documentation contained herein are copyrighted materials.
  116. They may be freely distributed as long as the copyright notices are intact,
  117. all pertinent components remain together and the package is distributed
  118. on a non-profit basis (i.e. no attempt is made to charge for more than the
  119. cost of copying and no attempts are made to hinder distribution).  My
  120. apologies for the quality of the sample artwork.  Obviously, my talents lie
  121. in other directions!
  122.